<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

# 法大大回调
Route::post('/fdd/callback', 'FddCallbackController@message')->name('fdd_callback');

# 支付回调
Route::post('/payment/notify', 'PaymentNotifyController@notify')->name('payment_notify');
Route::any('/account/notify', 'AccountNotifyController@notify')->name('account_notify');
Route::any('/agent/notify', 'AgentNotifyController@notify')->name('agent_notify');

Route::post('/device/create', 'DeviceController@create')->name('create_device');


Route::post('/agent/payment/notify', 'AgentPaymentNotifyController@notify')->name('agent_payment_notify');

/**
 * 移动数据
 */
Route::get('/device/power_chart', 'DeviceController@powerChart')->name('power_chart');
Route::get('/device/get_detail', 'DeviceController@deviceDetail')->name('get_detail');
Route::get('/device/area_list', 'DeviceController@areaList')->name('area_list');
Route::get('/device/get_list', 'DeviceController@getDeviceList')->name('get_list');


Route::get('/device/push_warning', 'DeviceController@pushWarning')->name('push_warning');


/**
 * 耗电量
 */
Route::get('/device/tj_test', 'DeviceController@tjTest')->name('tj_test');
Route::get('/device/del_tj_test', 'DeviceController@delTest')->name('del_tj_test');

Route::get('/device/change_price', 'DeviceController@changePrice')->name('change_price');
/**
 * 告警设置
 */
Route::get('/device/set_warning', 'DeviceController@setWarning')->name('set_warning');
Route::get('/device/cancel_warning', 'DeviceController@cancelWarning')->name('cancel_warning');



Route::get('/country/test_country', 'DeviceController@testCountry')->name('test_country');
Route::get('/country/test_warning', 'DeviceController@testWarning')->name('test_warning');

//Route::get('/device/delete_log', 'DeviceController@deleteLog')->name('delete_log');
//
//Route::get('/device/delete_house', 'DeviceController@deleteHouse')->name('delete_house');


Route::get('/device/business_conf', 'DeviceController@getBusinessConf')->name('business_conf');
Route::get('/device/white_test', 'DeviceController@testWhite')->name('business_conf');


Route::get('/sub/wechat', 'WechatController@index')->name('sub_wechat');


Route::get('/class/export', 'DeviceController@exportUsed')->name('export_used');
Route::get('/draw/cache', 'DeviceController@getCacheDraw')->name('draw_cache');
Route::get('/area/all', 'DeviceController@getAreas')->name('area_all');


Route::get('/device/makeFgTest', 'DeviceController@makeFgTest');
Route::get('/device/test', 'DeviceController@test');



Route::any('/account/query', 'DeviceController@queryAmount');
Route::any('/account/amount', 'DeviceController@descAmount');
